package info.techgeek.labs.patterns.strategy.Duck2;

public class SortByWeight implements SortStrategy {

	public int sortingAlgorithm(Object f, Object s) {
		DuckSortable o1 = (DuckSortable) f;
		DuckSortable o2 = (DuckSortable) s;
		
		if (o1.getDuckWeight() < o2.getDuckWeight())	return -1;
		if (o1.getDuckWeight() == o2.getDuckWeight())	return 0;
		return 1;
	}

}